This invention relates generally to computer operating systems, and more particularly to the protection of critical operating system files shared by different applications.
A modern computer operating system is a highly complex program that may have multiple layers in its architecture and comprise myriads of files for serving different functions. Some of the operating system components are designed to provide various system functions to applications installed on the system and are thus xe2x80x9csharedxe2x80x9d by the applications. For instance, in the WINDOWS operating systems of Microsoft Corporation, there are many files in the form of dynamic-link library (DLL) files that application programs can link to and call functions implemented therein during runtime.
Because shared operating system files such as DLL files are used by numerous different applications, quite a few applications may stop working if one of those shared system files is corrupted, inadvertently overwritten, or otherwise destroyed. Invalid modifications to the shared system files can therefore become a serious cause of system instability. For instance, the WINDOWS operating systems allow the installer program of a third party application to add all files needed by the application to the system during installation of that application. Those files added during installation often include DLL files that are shared by other applications. The ability of an installer to modify system files enables the installer to ensure that the application will have all the files it needs to perform as designed. It, however, also exposes the operating system to significant problems of system instability, because the installer can also make improper changes to shared system files needed by other applications. For instance, the installer of an older application may overwrite an existing DLL file on the system with an older version of that file that does not work with newer applications. Some software vendors may also attempt to overwrite selected DLL files with some proprietary versions of those files that are incompatible with other applications. As operating systems become more complex and more applications are available, the risk of having shared system files overwritten with invalid versions during application installation or update becomes increasingly higher. System instability due to improper changes to shared operating system files has recently become a very significant problem experienced by users and an important factor in comparing operating systems.
In view of the foregoing, the present invention provides a system and method for protecting shared system files that prevents system files, such as DLL files, shared by applications from being improperly modified during installation or update of applications or by user actions. To protect the shared system files, the operating system is provided with a monitoring component for monitoring changes to the system files. When a protected system file is being changed, the monitoring component saves a copy of the original file and informs a system file protection (SFP) service of the change. The SFP service checks the modified file to determine whether it is valid. If the modified file is invalid, the system file is restored to its original contents using the copy saved by the monitor component. Unauthorized importation of system files by application installers or update packages is also prevented by requiring a valid certificate for the package presenting the system files to be installed.
Additional features and advantages of the invention will be made apparent from the following detailed description of illustrative embodiments, which proceeds with reference to the accompanying figures.